| Edwin Kempin | 2eebd14 | 2013-03-06 15:28:34 +0100 | [diff] [blame] | 1 | Gerrit Code Review - /projects/ REST API |
| 2 | ======================================== |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 3 | |
| 4 | This page describes the project related REST endpoints. |
| 5 | Please also take note of the general information on the |
| 6 | link:rest-api.html[REST API]. |
| 7 | |
| Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 8 | [[project-endpoints]] |
| 9 | Project Endpoints |
| 10 | ----------------- |
| 11 | |
| Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 12 | [[list-projects]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 13 | List Projects |
| 14 | ~~~~~~~~~~~~~ |
| 15 | [verse] |
| 16 | 'GET /projects/' |
| 17 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 18 | Lists the projects accessible by the caller. This is the same as |
| 19 | using the link:cmd-ls-projects.html[ls-projects] command over SSH, |
| 20 | and accepts the same options as query parameters. |
| 21 | |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 22 | As result a map is returned that maps the project names to |
| 23 | link:#project-info[ProjectInfo] entries. The entries in the map are sorted |
| 24 | by project name. |
| 25 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 26 | .Request |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 27 | ---- |
| 28 | GET /projects/?d HTTP/1.0 |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 29 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 30 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 31 | .Response |
| 32 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 33 | HTTP/1.1 200 OK |
| 34 | Content-Disposition: attachment |
| 35 | Content-Type: application/json;charset=UTF-8 |
| 36 | |
| 37 | )]}' |
| 38 | { |
| 39 | "external/bison": { |
| 40 | "kind": "gerritcodereview#project", |
| 41 | "id": "external%2Fbison", |
| 42 | "description": "GNU parser generator" |
| 43 | }, |
| 44 | "external/gcc": { |
| 45 | "kind": "gerritcodereview#project", |
| 46 | "id": "external%2Fgcc", |
| 47 | }, |
| 48 | "external/openssl": { |
| 49 | "kind": "gerritcodereview#project", |
| 50 | "id": "external%2Fopenssl", |
| 51 | "description": "encryption\ncrypto routines" |
| 52 | }, |
| 53 | "test": { |
| 54 | "kind": "gerritcodereview#project", |
| 55 | "id": "test", |
| 56 | "description": "\u003chtml\u003e is escaped" |
| 57 | } |
| 58 | } |
| 59 | ---- |
| 60 | |
| Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 61 | .Get all projects with their description |
| 62 | **** |
| 63 | get::/projects/?d |
| 64 | **** |
| 65 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 66 | [[suggest-projects]] |
| 67 | The `/projects/` URL also accepts a prefix string in the `p` parameter. |
| 68 | This limits the results to those projects that start with the specified |
| 69 | prefix. |
| 70 | List all projects that start with `platform/`: |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 71 | |
| 72 | .Request |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 73 | ---- |
| 74 | GET /projects/?p=platform%2F HTTP/1.0 |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 75 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 76 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 77 | .Response |
| 78 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 79 | HTTP/1.1 200 OK |
| 80 | Content-Disposition: attachment |
| 81 | Content-Type: application/json;charset=UTF-8 |
| 82 | |
| 83 | )]}' |
| 84 | { |
| 85 | "platform/drivers": { |
| 86 | "kind": "gerritcodereview#project", |
| 87 | "id": "platform%2Fdrivers", |
| 88 | }, |
| 89 | "platform/tools": { |
| 90 | "kind": "gerritcodereview#project", |
| 91 | "id": "platform%2Ftools", |
| 92 | } |
| 93 | } |
| 94 | ---- |
| 95 | E.g. this feature can be used by suggestion client UI's to limit results. |
| 96 | |
| Edwin Kempin | 5c544e2 | 2013-03-06 13:35:45 +0100 | [diff] [blame] | 97 | [[get-project]] |
| 98 | Get Project |
| 99 | ~~~~~~~~~~~ |
| 100 | [verse] |
| 101 | 'GET /projects/link:#project-name[\{project-name\}]' |
| 102 | |
| 103 | Retrieves a project. |
| 104 | |
| 105 | .Request |
| 106 | ---- |
| 107 | GET /projects/plugins%2Freplication HTTP/1.0 |
| 108 | ---- |
| 109 | |
| 110 | As response a link:#project-info[ProjectInfo] entity is returned that |
| 111 | describes the project. |
| 112 | |
| 113 | .Response |
| 114 | ---- |
| 115 | HTTP/1.1 200 OK |
| 116 | Content-Disposition: attachment |
| 117 | Content-Type: application/json;charset=UTF-8 |
| 118 | |
| 119 | )]}' |
| 120 | { |
| 121 | "kind": "gerritcodereview#project", |
| 122 | "id": "plugins%2Freplication", |
| 123 | "name": "plugins/replication", |
| 124 | "parent": "Public-Plugins", |
| 125 | "description": "Copies to other servers using the Git protocol" |
| 126 | } |
| 127 | ---- |
| 128 | |
| Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 129 | [[create-project]] |
| 130 | Create Project |
| 131 | ~~~~~~~~~~~~~~ |
| 132 | [verse] |
| 133 | 'PUT /projects/link:#project-name[\{project-name\}]' |
| 134 | |
| 135 | Creates a new project. |
| 136 | |
| 137 | In the request body additional data for the project can be provided as |
| 138 | link:#project-input[ProjectInput]. |
| 139 | |
| 140 | .Request |
| 141 | ---- |
| 142 | PUT /projects/MyProject HTTP/1.0 |
| 143 | Content-Type: application/json;charset=UTF-8 |
| 144 | |
| 145 | { |
| 146 | "description": "This is a demo project.", |
| 147 | "submit_type": "CHERRY_PICK", |
| 148 | "owners": [ |
| 149 | "MyProject-Owners" |
| 150 | ] |
| 151 | } |
| 152 | ---- |
| 153 | |
| 154 | As response the link:#project-info[ProjectInfo] entity is returned that |
| 155 | describes the created project. |
| 156 | |
| 157 | .Response |
| 158 | ---- |
| 159 | HTTP/1.1 201 Created |
| 160 | Content-Disposition: attachment |
| 161 | Content-Type: application/json;charset=UTF-8 |
| 162 | |
| 163 | )]}' |
| 164 | { |
| 165 | "kind": "gerritcodereview#project", |
| 166 | "id": "MyProject", |
| 167 | "name": "MyProject", |
| 168 | "parent": "All-Projects", |
| 169 | "description": "This is a demo project." |
| 170 | } |
| 171 | ---- |
| 172 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 173 | [[get-project-description]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 174 | Get Project Description |
| 175 | ~~~~~~~~~~~~~~~~~~~~~~~ |
| 176 | [verse] |
| 177 | 'GET /projects/link:#project-name[\{project-name\}]/description' |
| 178 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 179 | Retrieves the description of a project. |
| 180 | |
| 181 | .Request |
| 182 | ---- |
| 183 | GET /projects/plugins%2Freplication/description HTTP/1.0 |
| 184 | ---- |
| 185 | |
| 186 | .Response |
| 187 | ---- |
| 188 | HTTP/1.1 200 OK |
| 189 | Content-Disposition: attachment |
| 190 | Content-Type: application/json;charset=UTF-8 |
| 191 | |
| 192 | )]}' |
| 193 | "Copies to other servers using the Git protocol" |
| 194 | ---- |
| 195 | |
| Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 196 | If the project does not have a description an empty string is returned. |
| 197 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 198 | [[set-project-description]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 199 | Set Project Description |
| 200 | ~~~~~~~~~~~~~~~~~~~~~~~ |
| 201 | [verse] |
| 202 | 'PUT /projects/link:#project-name[\{project-name\}]/description' |
| 203 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 204 | Sets the description of a project. |
| 205 | |
| 206 | The new project description must be provided in the request body inside |
| 207 | a link:#project-description-input[ProjectDescriptionInput] entity. |
| 208 | |
| 209 | .Request |
| 210 | ---- |
| 211 | PUT /projects/plugins%2Freplication/description HTTP/1.0 |
| 212 | Content-Type: application/json;charset=UTF-8 |
| 213 | |
| 214 | { |
| 215 | "description": "Plugin for Gerrit that handles the replication.", |
| 216 | "commit_message": "Update the project description" |
| 217 | } |
| 218 | ---- |
| 219 | |
| 220 | As response the new project description is returned. |
| 221 | |
| 222 | .Response |
| 223 | ---- |
| 224 | HTTP/1.1 200 OK |
| 225 | Content-Disposition: attachment |
| 226 | Content-Type: application/json;charset=UTF-8 |
| 227 | |
| 228 | )]}' |
| 229 | "Plugin for Gerrit that handles the replication." |
| 230 | ---- |
| 231 | |
| Edwin Kempin | 114ab16 | 2013-02-28 09:25:37 +0100 | [diff] [blame] | 232 | If the description was deleted the response is "`204 No Content`". |
| 233 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 234 | [[delete-project-description]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 235 | Delete Project Description |
| 236 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 237 | [verse] |
| 238 | 'DELETE /projects/link:#project-name[\{project-name\}]/description' |
| 239 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 240 | Deletes the description of a project. |
| 241 | |
| Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 242 | The request body does not need to include a |
| 243 | link:#project-description-input[ProjectDescriptionInput] entity if no |
| 244 | commit message is specified. |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 245 | |
| Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 246 | Please note that some proxies prohibit request bodies for DELETE |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 247 | requests. In this case, if you want to specify a commit message, use |
| 248 | link:#set-project-description[PUT] to delete the description. |
| 249 | |
| 250 | .Request |
| 251 | ---- |
| 252 | DELETE /projects/plugins%2Freplication/description HTTP/1.0 |
| 253 | ---- |
| 254 | |
| 255 | .Response |
| 256 | ---- |
| 257 | HTTP/1.1 204 No Content |
| 258 | ---- |
| 259 | |
| Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 260 | [[get-project-parent]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 261 | Get Project Parent |
| 262 | ~~~~~~~~~~~~~~~~~~ |
| 263 | [verse] |
| 264 | 'GET /projects/link:#project-name[\{project-name\}]/parent' |
| 265 | |
| Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 266 | Retrieves the name of a project's parent project. For the |
| 267 | `All-Projects` root project an empty string is returned. |
| 268 | |
| 269 | .Request |
| 270 | ---- |
| 271 | GET /projects/plugins%2Freplication/parent HTTP/1.0 |
| 272 | ---- |
| 273 | |
| 274 | .Response |
| 275 | ---- |
| 276 | HTTP/1.1 200 OK |
| 277 | Content-Disposition: attachment |
| 278 | Content-Type: application/json;charset=UTF-8 |
| 279 | |
| 280 | )]}' |
| 281 | "All-Projects" |
| 282 | ---- |
| 283 | |
| 284 | [[set-project-parent]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 285 | Set Project Parent |
| 286 | ~~~~~~~~~~~~~~~~~~ |
| 287 | [verse] |
| 288 | 'PUT /projects/link:#project-name[\{project-name\}]/parent' |
| 289 | |
| Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 290 | Sets the parent project for a project. |
| 291 | |
| 292 | The new name of the parent project must be provided in the request body |
| 293 | inside a link:#project-parent-input[ProjectParentInput] entity. |
| 294 | |
| 295 | .Request |
| 296 | ---- |
| 297 | PUT /projects/plugins%2Freplication/parent HTTP/1.0 |
| 298 | Content-Type: application/json;charset=UTF-8 |
| 299 | |
| 300 | { |
| 301 | "parent": "Public-Plugins", |
| 302 | "commit_message": "Update the project parent" |
| 303 | } |
| 304 | ---- |
| 305 | |
| 306 | As response the new parent project name is returned. |
| 307 | |
| 308 | .Response |
| 309 | ---- |
| 310 | HTTP/1.1 200 OK |
| 311 | Content-Disposition: attachment |
| 312 | Content-Type: application/json;charset=UTF-8 |
| 313 | |
| 314 | )]}' |
| 315 | "Public-Plugins" |
| 316 | ---- |
| 317 | |
| Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 318 | [[get-head]] |
| 319 | Get HEAD |
| 320 | ~~~~~~~~ |
| 321 | [verse] |
| 322 | 'GET /projects/link:#project-name[\{project-name\}]/HEAD' |
| 323 | |
| 324 | Retrieves for a project the name of the branch to which `HEAD` points. |
| 325 | |
| 326 | .Request |
| 327 | ---- |
| 328 | GET /projects/plugins%2Freplication/HEAD HTTP/1.0 |
| 329 | ---- |
| 330 | |
| 331 | .Response |
| 332 | ---- |
| 333 | HTTP/1.1 200 OK |
| 334 | Content-Disposition: attachment |
| 335 | Content-Type: application/json;charset=UTF-8 |
| 336 | |
| 337 | )]}' |
| 338 | "refs/heads/master" |
| 339 | ---- |
| 340 | |
| 341 | [[set-head]] |
| 342 | Set HEAD |
| 343 | ~~~~~~~~ |
| 344 | [verse] |
| 345 | 'PUT /projects/link:#project-name[\{project-name\}]/HEAD' |
| 346 | |
| 347 | Sets `HEAD` for a project. |
| 348 | |
| 349 | The new ref to which `HEAD` should point must be provided in the |
| 350 | request body inside a link:#head-input[HeadInput] entity. |
| 351 | |
| 352 | .Request |
| 353 | ---- |
| 354 | PUT /projects/plugins%2Freplication/HEAD HTTP/1.0 |
| 355 | Content-Type: application/json;charset=UTF-8 |
| 356 | |
| 357 | { |
| 358 | "ref": "refs/heads/stable" |
| 359 | } |
| 360 | ---- |
| 361 | |
| 362 | As response the new ref to which `HEAD` points is returned. |
| 363 | |
| 364 | .Response |
| 365 | ---- |
| 366 | HTTP/1.1 200 OK |
| 367 | Content-Disposition: attachment |
| 368 | Content-Type: application/json;charset=UTF-8 |
| 369 | |
| 370 | )]}' |
| 371 | "refs/heads/stable" |
| 372 | ---- |
| 373 | |
| Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 374 | [[get-repository-statistics]] |
| 375 | Get Repository Statistics |
| 376 | ~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 377 | [verse] |
| 378 | 'GET /projects/link:#project-name[\{project-name\}]/statistics.git' |
| 379 | |
| 380 | Return statistics for the repository of a project. |
| 381 | |
| 382 | .Request |
| 383 | ---- |
| 384 | GET /projects/plugins%2Freplication/statistics.git HTTP/1.0 |
| 385 | ---- |
| 386 | |
| 387 | The repository statistics are returned as a |
| 388 | link:#repository-statistics-info[RepositoryStatisticsInfo] entity. |
| 389 | |
| 390 | .Response |
| 391 | ---- |
| 392 | HTTP/1.1 200 OK |
| 393 | Content-Disposition: attachment |
| 394 | Content-Type: application/json;charset=UTF-8 |
| 395 | |
| 396 | )]}' |
| 397 | { |
| 398 | "number_of_loose_objects": 127, |
| 399 | "number_of_loose_refs": 15, |
| 400 | "number_of_pack_files": 15, |
| 401 | "number_of_packed_objects": 67, |
| 402 | "number_of_packed_refs": 0, |
| 403 | "size_of_loose_objects": 29466, |
| 404 | "size_of_packed_objects": 9646 |
| 405 | } |
| 406 | ---- |
| 407 | |
| Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 408 | [[get-config]] |
| 409 | Get Config |
| 410 | ~~~~~~~~~~ |
| 411 | [verse] |
| 412 | 'GET /projects/link:#project-name[\{project-name\}]/config' |
| 413 | |
| 414 | Gets some configuration information about a project. Note that this |
| 415 | config info is not simply the contents of `project.config`; it generally |
| 416 | contains fields that may have been inherited from parent projects. |
| 417 | |
| 418 | .Request |
| 419 | ---- |
| 420 | GET /projects/myproject/config |
| 421 | ---- |
| 422 | |
| 423 | A link:#config-info[ConfigInfo] entity is returned that describes the |
| 424 | project configuration. Some fields are only visible to users that have |
| 425 | read access to `refs/meta/config`. |
| 426 | |
| 427 | .Response |
| 428 | ---- |
| 429 | HTTP/1.1 200 OK |
| 430 | Content-Disposition: attachment |
| 431 | Content-Type: application/json;charset=UTF-8 |
| 432 | |
| 433 | )]}' |
| 434 | { |
| 435 | "kind": "gerritcodereview#project_config", |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 436 | "description": "demo project", |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 437 | "use_contributor_agreements": { |
| 438 | "value": true, |
| 439 | "configured_value": "TRUE", |
| 440 | "inherited_value": false |
| 441 | }, |
| 442 | "use_content_merge": { |
| 443 | "value": true, |
| 444 | "configured_value": "INHERIT", |
| 445 | "inherited_value": true |
| 446 | }, |
| 447 | "use_signed_off_by": { |
| 448 | "value": false, |
| 449 | "configured_value": "INHERIT", |
| 450 | "inherited_value": false |
| 451 | }, |
| 452 | "require_change_id": { |
| 453 | "value": false, |
| 454 | "configured_value": "FALSE", |
| 455 | "inherited_value": true |
| Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 456 | }, |
| 457 | "max_object_size_limit": { |
| 458 | "value": "15m", |
| 459 | "configured_value": "15m", |
| 460 | "inherited_value": "20m" |
| 461 | }, |
| 462 | "submit_type": "MERGE_IF_NECESSARY", |
| 463 | "state": "ACTIVE", |
| David Ostrovsky | 9e8b2fb | 2013-08-30 08:09:53 +0200 | [diff] [blame] | 464 | "commentlinks": {}, |
| 465 | "actions": { |
| 466 | "cookbook~hello-project": { |
| 467 | "method": "POST", |
| 468 | "label": "Say hello", |
| 469 | "title": "Say hello in different languages", |
| 470 | "enabled": true |
| 471 | } |
| 472 | } |
| Dave Borowitz | 237073a | 2013-04-04 16:52:27 -0700 | [diff] [blame] | 473 | } |
| 474 | ---- |
| 475 | |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 476 | [[set-config]] |
| 477 | Set Config |
| 478 | ~~~~~~~~~~ |
| 479 | [verse] |
| 480 | 'PUT /projects/link:#project-name[\{project-name\}]/config' |
| 481 | |
| 482 | Sets the configuration of a project. |
| 483 | |
| 484 | The new configuration must be provided in the request body as a |
| 485 | link:#config-input[ConfigInput] entity. |
| 486 | |
| 487 | .Request |
| 488 | ---- |
| 489 | PUT /projects/myproject/config HTTP/1.0 |
| 490 | Content-Type: application/json;charset=UTF-8 |
| 491 | |
| 492 | { |
| 493 | "description": "demo project", |
| 494 | "use_contributor_agreements": "FALSE", |
| 495 | "use_content_merge": "INHERIT", |
| 496 | "use_signed_off_by": "INHERIT", |
| 497 | "require_change_id": "TRUE", |
| 498 | "max_object_size_limit": "10m", |
| 499 | "submit_type": "REBASE_IF_NECESSARY", |
| 500 | "state": "ACTIVE" |
| 501 | } |
| 502 | ---- |
| 503 | |
| 504 | As response the new configuration is returned as a link:#config-info[ |
| 505 | ConfigInfo] entity. |
| 506 | |
| 507 | .Response |
| 508 | ---- |
| 509 | HTTP/1.1 200 OK |
| 510 | Content-Disposition: attachment |
| 511 | Content-Type: application/json;charset=UTF-8 |
| 512 | |
| 513 | )]}' |
| 514 | { |
| 515 | "kind": "gerritcodereview#project_config", |
| 516 | "use_contributor_agreements": { |
| 517 | "value": false, |
| 518 | "configured_value": "FALSE", |
| 519 | "inherited_value": false |
| 520 | }, |
| 521 | "use_content_merge": { |
| 522 | "value": true, |
| 523 | "configured_value": "INHERIT", |
| 524 | "inherited_value": true |
| 525 | }, |
| 526 | "use_signed_off_by": { |
| 527 | "value": false, |
| 528 | "configured_value": "INHERIT", |
| 529 | "inherited_value": false |
| 530 | }, |
| 531 | "require_change_id": { |
| 532 | "value": true, |
| 533 | "configured_value": "TRUE", |
| 534 | "inherited_value": true |
| 535 | }, |
| 536 | "max_object_size_limit": { |
| 537 | "value": "10m", |
| 538 | "configured_value": "10m", |
| 539 | "inherited_value": "20m" |
| 540 | }, |
| 541 | "submit_type": "REBASE_IF_NECESSARY", |
| 542 | "state": "ACTIVE", |
| 543 | "commentlinks": {} |
| 544 | } |
| 545 | ---- |
| 546 | |
| Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 547 | [[run-gc]] |
| 548 | Run GC |
| 549 | ~~~~~~ |
| 550 | [verse] |
| 551 | 'POST /projects/link:#project-name[\{project-name\}]/gc' |
| 552 | |
| 553 | Run the Git garbage collection for the repository of a project. |
| 554 | |
| Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 555 | Options for the Git garbage collection can be specified in the |
| 556 | request body as a link:#gc-input[GCInput] entity. |
| 557 | |
| Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 558 | .Request |
| 559 | ---- |
| 560 | POST /projects/plugins%2Freplication/gc HTTP/1.0 |
| Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 561 | Content-Type: application/json;charset=UTF-8 |
| 562 | |
| 563 | { |
| 564 | "show_progress": true |
| 565 | } |
| Edwin Kempin | ef3542f | 2013-03-19 13:31:49 +0100 | [diff] [blame] | 566 | ---- |
| 567 | |
| 568 | The response is the streamed output of the garbage collection. |
| 569 | |
| 570 | .Response |
| 571 | ---- |
| 572 | HTTP/1.1 200 OK |
| 573 | Content-Disposition: attachment |
| 574 | Content-Type: text/plain;charset=UTF-8 |
| 575 | |
| 576 | collecting garbage for "plugins/replication": |
| 577 | Pack refs: 100% (21/21) |
| 578 | Counting objects: 20 |
| 579 | Finding sources: 100% (20/20) |
| 580 | Getting sizes: 100% (13/13) |
| 581 | Compressing objects: 83% (5/6) |
| 582 | Writing objects: 100% (20/20) |
| 583 | Selecting commits: 100% (7/7) |
| 584 | Building bitmaps: 100% (7/7) |
| 585 | Finding sources: 100% (41/41) |
| 586 | Getting sizes: 100% (25/25) |
| 587 | Compressing objects: 52% (12/23) |
| 588 | Writing objects: 100% (41/41) |
| 589 | Prune loose objects also found in pack files: 100% (36/36) |
| 590 | Prune loose, unreferenced objects: 100% (36/36) |
| 591 | done. |
| 592 | ---- |
| 593 | |
| Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 594 | [[branch-endpoints]] |
| 595 | Branch Endpoints |
| 596 | ---------------- |
| 597 | |
| 598 | [[list-branches]] |
| 599 | List Branches |
| 600 | ~~~~~~~~~~~~~ |
| 601 | [verse] |
| 602 | 'GET /projects/link:#project-name[\{project-name\}]/branches/' |
| 603 | |
| 604 | List the branches of a project. |
| 605 | |
| 606 | As result a list of link:#branch-info[BranchInfo] entries is |
| 607 | returned. |
| 608 | |
| 609 | .Request |
| 610 | ---- |
| 611 | GET /projects/work%2Fmy-project/branches/ HTTP/1.0 |
| 612 | ---- |
| 613 | |
| 614 | .Response |
| 615 | ---- |
| 616 | HTTP/1.1 200 OK |
| 617 | Content-Disposition: attachment |
| 618 | Content-Type: application/json;charset=UTF-8 |
| 619 | |
| 620 | )]}' |
| 621 | [ |
| 622 | { |
| 623 | "ref": "HEAD", |
| 624 | "revision": "master" |
| 625 | }, |
| 626 | { |
| 627 | "ref": "refs/meta/config", |
| 628 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668" |
| 629 | }, |
| 630 | { |
| 631 | "ref": "refs/heads/master", |
| 632 | "revision": "67ebf73496383c6777035e374d2d664009e2aa5c" |
| 633 | }, |
| 634 | { |
| 635 | "ref": "refs/heads/stable", |
| 636 | "revision": "64ca533bd0eb5252d2fee83f63da67caae9b4674", |
| 637 | "can_delete": true |
| 638 | } |
| 639 | ] |
| 640 | ---- |
| 641 | |
| Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 642 | [[get-branch]] |
| 643 | Get Branch |
| 644 | ~~~~~~~~~~ |
| 645 | [verse] |
| 646 | 'GET /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]' |
| 647 | |
| 648 | Retrieves a branch of a project. |
| 649 | |
| 650 | .Request |
| 651 | ---- |
| 652 | GET /projects/work%2Fmy-project/branches/master HTTP/1.0 |
| 653 | ---- |
| 654 | |
| 655 | As response a link:#branch-info[BranchInfo] entity is returned that |
| 656 | describes the branch. |
| 657 | |
| 658 | .Response |
| 659 | ---- |
| 660 | HTTP/1.1 200 OK |
| 661 | Content-Disposition: attachment |
| 662 | Content-Type: application/json;charset=UTF-8 |
| 663 | |
| 664 | )]}' |
| 665 | { |
| 666 | "ref": "refs/heads/master", |
| 667 | "revision": "67ebf73496383c6777035e374d2d664009e2aa5c" |
| 668 | } |
| 669 | ---- |
| 670 | |
| Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 671 | [[create-branch]] |
| 672 | Create Branch |
| 673 | ~~~~~~~~~~~~~ |
| 674 | [verse] |
| 675 | 'PUT /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]' |
| 676 | |
| 677 | Creates a new branch. |
| 678 | |
| 679 | In the request body additional data for the branch can be provided as |
| 680 | link:#branch-input[BranchInput]. |
| 681 | |
| 682 | .Request |
| 683 | ---- |
| 684 | PUT /projects/MyProject/branches/stable HTTP/1.0 |
| 685 | Content-Type: application/json;charset=UTF-8 |
| 686 | |
| 687 | { |
| 688 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668" |
| 689 | } |
| 690 | ---- |
| 691 | |
| 692 | As response a link:#branch-info[BranchInfo] entity is returned that |
| 693 | describes the created branch. |
| 694 | |
| 695 | .Response |
| 696 | ---- |
| 697 | HTTP/1.1 201 Created |
| 698 | Content-Disposition: attachment |
| 699 | Content-Type: application/json;charset=UTF-8 |
| 700 | |
| 701 | )]}' |
| 702 | { |
| 703 | "ref": "refs/heads/stable", |
| 704 | "revision": "76016386a0d8ecc7b6be212424978bb45959d668", |
| 705 | "can_delete": true |
| 706 | } |
| 707 | ---- |
| 708 | |
| Edwin Kempin | 6ce96a1 | 2013-06-06 13:20:01 +0200 | [diff] [blame] | 709 | [[delete-branch]] |
| 710 | Delete Branch |
| 711 | ~~~~~~~~~~~~~ |
| 712 | [verse] |
| 713 | 'DELETE /projects/link:#project-name[\{project-name\}]/branches/link:#branch-id[\{branch-id\}]' |
| 714 | |
| 715 | Deletes a branch. |
| 716 | |
| 717 | .Request |
| 718 | ---- |
| 719 | DELETE /projects/MyProject/branches/stable HTTP/1.0 |
| 720 | ---- |
| 721 | |
| 722 | .Response |
| 723 | ---- |
| 724 | HTTP/1.1 204 No Content |
| 725 | ---- |
| 726 | |
| Edwin Kempin | 4425c74 | 2013-03-18 13:23:00 +0100 | [diff] [blame] | 727 | [[child-project-endpoints]] |
| 728 | Child Project Endpoints |
| 729 | ----------------------- |
| 730 | |
| 731 | [[list-child-projects]] |
| 732 | List Child Projects |
| 733 | ~~~~~~~~~~~~~~~~~~~ |
| 734 | [verse] |
| 735 | 'GET /projects/link:#project-name[\{project-name\}]/children/' |
| 736 | |
| 737 | List the direct child projects of a project. |
| 738 | |
| 739 | .Request |
| 740 | ---- |
| 741 | GET /projects/Public-Plugins/children/ HTTP/1.0 |
| 742 | ---- |
| 743 | |
| 744 | As result a list of link:#project-info[ProjectInfo] entries is |
| 745 | returned that describe the child projects. |
| 746 | |
| 747 | .Response |
| 748 | ---- |
| 749 | HTTP/1.1 200 OK |
| 750 | Content-Disposition: attachment |
| 751 | Content-Type: application/json;charset=UTF-8 |
| 752 | |
| 753 | )]}' |
| 754 | [ |
| 755 | { |
| 756 | "kind": "gerritcodereview#project", |
| 757 | "id": "plugins%2Freplication", |
| 758 | "name": "plugins/replication", |
| 759 | "parent": "Public-Plugins", |
| 760 | "description": "Copies to other servers using the Git protocol" |
| 761 | }, |
| 762 | { |
| 763 | "kind": "gerritcodereview#project", |
| 764 | "id": "plugins%2Freviewnotes", |
| 765 | "name": "plugins/reviewnotes", |
| 766 | "parent": "Public-Plugins", |
| 767 | "description": "Annotates merged commits using notes on refs/notes/review." |
| 768 | }, |
| 769 | { |
| 770 | "kind": "gerritcodereview#project", |
| 771 | "id": "plugins%2Fsingleusergroup", |
| 772 | "name": "plugins/singleusergroup", |
| 773 | "parent": "Public-Plugins", |
| 774 | "description": "GroupBackend enabling users to be directly added to access rules" |
| 775 | } |
| 776 | ] |
| 777 | ---- |
| 778 | |
| Edwin Kempin | f95bd17 | 2013-03-19 11:10:57 +0100 | [diff] [blame] | 779 | To resolve the child projects of a project recursively the parameter |
| 780 | `recursive` can be set. |
| 781 | |
| 782 | Child projects that are not visible to the calling user are ignored and |
| 783 | are not resolved further. |
| 784 | |
| 785 | .Request |
| 786 | ---- |
| 787 | GET /projects/Public-Projects/children/?recursive HTTP/1.0 |
| 788 | ---- |
| 789 | |
| 790 | .Response |
| 791 | ---- |
| 792 | HTTP/1.1 200 OK |
| 793 | Content-Disposition: attachment |
| 794 | Content-Type: application/json;charset=UTF-8 |
| 795 | |
| 796 | )]}' |
| 797 | [ |
| 798 | { |
| 799 | "kind": "gerritcodereview#project", |
| 800 | "id": "gerrit", |
| 801 | "name": "gerrit", |
| 802 | "parent": "Public-Projects", |
| 803 | "description": "Gerrit Code Review" |
| 804 | }, |
| 805 | { |
| 806 | "kind": "gerritcodereview#project", |
| 807 | "id": "plugins%2Freplication", |
| 808 | "name": "plugins/replication", |
| 809 | "parent": "Public-Plugins", |
| 810 | "description": "Copies to other servers using the Git protocol" |
| 811 | }, |
| 812 | { |
| 813 | "kind": "gerritcodereview#project", |
| 814 | "id": "plugins%2Freviewnotes", |
| 815 | "name": "plugins/reviewnotes", |
| 816 | "parent": "Public-Plugins", |
| 817 | "description": "Annotates merged commits using notes on refs/notes/review." |
| 818 | }, |
| 819 | { |
| 820 | "kind": "gerritcodereview#project", |
| 821 | "id": "plugins%2Fsingleusergroup", |
| 822 | "name": "plugins/singleusergroup", |
| 823 | "parent": "Public-Plugins", |
| 824 | "description": "GroupBackend enabling users to be directly added to access rules" |
| 825 | }, |
| 826 | { |
| 827 | "kind": "gerritcodereview#project", |
| 828 | "id": "Public-Plugins", |
| 829 | "name": "Public-Plugins", |
| 830 | "parent": "Public-Projects", |
| 831 | "description": "Parent project for plugins/*" |
| 832 | } |
| 833 | ] |
| 834 | ---- |
| 835 | |
| Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 836 | [[get-child-project]] |
| 837 | Get Child Project |
| 838 | ~~~~~~~~~~~~~~~~~ |
| 839 | [verse] |
| 840 | 'GET /projects/link:#project-name[\{project-name\}]/children/link:#project-name[\{project-name\}]' |
| 841 | |
| Edwin Kempin | 8a3fb5b | 2013-03-21 15:02:22 +0100 | [diff] [blame] | 842 | Retrieves a child project. If a non-direct child project should be |
| 843 | retrieved the parameter `recursive` must be set. |
| Edwin Kempin | 5b6c406 | 2013-03-19 09:26:03 +0100 | [diff] [blame] | 844 | |
| 845 | .Request |
| 846 | ---- |
| 847 | GET /projects/Public-Plugins/children/plugins%2Freplication HTTP/1.0 |
| 848 | ---- |
| 849 | |
| 850 | As response a link:#project-info[ProjectInfo] entity is returned that |
| 851 | describes the child project. |
| 852 | |
| 853 | .Response |
| 854 | ---- |
| 855 | HTTP/1.1 200 OK |
| 856 | Content-Disposition: attachment |
| 857 | Content-Type: application/json;charset=UTF-8 |
| 858 | |
| 859 | )]}' |
| 860 | { |
| 861 | "kind": "gerritcodereview#project", |
| 862 | "id": "plugins%2Freplication", |
| 863 | "name": "plugins/replication", |
| 864 | "parent": "Public-Plugins", |
| 865 | "description": "Copies to other servers using the Git protocol" |
| 866 | } |
| 867 | ---- |
| 868 | |
| Edwin Kempin | c3fe3cb | 2013-02-13 15:09:23 +0100 | [diff] [blame] | 869 | [[dashboard-endpoints]] |
| 870 | Dashboard Endpoints |
| 871 | ------------------- |
| 872 | |
| Edwin Kempin | 7620274 | 2013-02-15 13:51:50 +0100 | [diff] [blame] | 873 | [[list-dashboards]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 874 | List Dashboards |
| 875 | ~~~~~~~~~~~~~~~ |
| 876 | [verse] |
| 877 | 'GET /projects/link:#project-name[\{project-name\}]/dashboards/' |
| 878 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 879 | List custom dashboards for a project. |
| 880 | |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 881 | As result a list of link:#dashboard-info[DashboardInfo] entries is |
| 882 | returned. |
| 883 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 884 | List all dashboards for the `work/my-project` project: |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 885 | |
| 886 | .Request |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 887 | ---- |
| 888 | GET /projects/work%2Fmy-project/dashboards/ HTTP/1.0 |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 889 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 890 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 891 | .Response |
| 892 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 893 | HTTP/1.1 200 OK |
| 894 | Content-Disposition: attachment |
| 895 | Content-Type: application/json;charset=UTF-8 |
| 896 | |
| 897 | )]}' |
| 898 | [ |
| 899 | { |
| 900 | "kind": "gerritcodereview#dashboard", |
| 901 | "id": "main:closed", |
| 902 | "ref": "main", |
| 903 | "path": "closed", |
| 904 | "description": "Merged and abandoned changes in last 7 weeks", |
| 905 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 906 | "default": true, |
| 907 | "title": "Closed changes", |
| 908 | "sections": [ |
| 909 | { |
| 910 | "name": "Merged", |
| 911 | "query": "status:merged age:7w" |
| 912 | }, |
| 913 | { |
| 914 | "name": "Abandoned", |
| 915 | "query": "status:abandoned age:7w" |
| 916 | } |
| 917 | ] |
| 918 | } |
| 919 | ] |
| 920 | ---- |
| 921 | |
| Edwin Kempin | a64c4b9 | 2013-01-23 11:30:40 +0100 | [diff] [blame] | 922 | .Get all dashboards of the 'All-Projects' project |
| 923 | **** |
| 924 | get::/projects/All-Projects/dashboards/ |
| 925 | **** |
| 926 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 927 | [[get-dashboard]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 928 | Get Dashboard |
| 929 | ~~~~~~~~~~~~~ |
| 930 | [verse] |
| 931 | 'GET /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]' |
| 932 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 933 | Retrieves a project dashboard. The dashboard can be defined on that |
| 934 | project or be inherited from a parent project. |
| 935 | |
| 936 | .Request |
| 937 | ---- |
| 938 | GET /projects/work%2Fmy-project/dashboards/main:closed HTTP/1.0 |
| 939 | ---- |
| 940 | |
| 941 | As response a link:#dashboard-info[DashboardInfo] entity is returned |
| 942 | that describes the dashboard. |
| 943 | |
| 944 | .Response |
| 945 | ---- |
| 946 | HTTP/1.1 200 OK |
| 947 | Content-Disposition: attachment |
| 948 | Content-Type: application/json;charset=UTF-8 |
| 949 | |
| 950 | )]}' |
| 951 | { |
| 952 | "kind": "gerritcodereview#dashboard", |
| 953 | "id": "main:closed", |
| 954 | "ref": "main", |
| 955 | "path": "closed", |
| 956 | "description": "Merged and abandoned changes in last 7 weeks", |
| 957 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 958 | "default": true, |
| 959 | "title": "Closed changes", |
| 960 | "sections": [ |
| 961 | { |
| 962 | "name": "Merged", |
| 963 | "query": "status:merged age:7w" |
| 964 | }, |
| 965 | { |
| 966 | "name": "Abandoned", |
| 967 | "query": "status:abandoned age:7w" |
| 968 | } |
| 969 | ] |
| 970 | } |
| 971 | ---- |
| 972 | |
| 973 | To retrieve the default dashboard of a project use `default` as |
| 974 | dashboard-id. |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 975 | |
| 976 | .Request |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 977 | ---- |
| 978 | GET /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 979 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 980 | |
| Edwin Kempin | 3744083 | 2013-02-06 11:36:00 +0100 | [diff] [blame] | 981 | .Response |
| 982 | ---- |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 983 | HTTP/1.1 200 OK |
| 984 | Content-Disposition: attachment |
| 985 | Content-Type: application/json;charset=UTF-8 |
| 986 | |
| 987 | )]}' |
| 988 | { |
| 989 | "kind": "gerritcodereview#dashboard", |
| 990 | "id": "main:closed", |
| 991 | "ref": "main", |
| 992 | "path": "closed", |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 993 | "description": "Merged and abandoned changes in last 7 weeks", |
| 994 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 995 | "default": true, |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 996 | "title": "Closed changes", |
| 997 | "sections": [ |
| 998 | { |
| 999 | "name": "Merged", |
| 1000 | "query": "status:merged age:7w" |
| 1001 | }, |
| 1002 | { |
| 1003 | "name": "Abandoned", |
| 1004 | "query": "status:abandoned age:7w" |
| 1005 | } |
| 1006 | ] |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1007 | } |
| 1008 | ---- |
| 1009 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1010 | [[set-dashboard]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1011 | Set Dashboard |
| 1012 | ~~~~~~~~~~~~~ |
| 1013 | [verse] |
| 1014 | 'PUT /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]' |
| 1015 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1016 | Updates/Creates a project dashboard. |
| 1017 | |
| 1018 | Currently only supported for the `default` dashboard. |
| 1019 | |
| 1020 | The creation/update information for the dashboard must be provided in |
| 1021 | the request body as a link:#dashboard-input[DashboardInput] entity. |
| 1022 | |
| 1023 | .Request |
| 1024 | ---- |
| 1025 | PUT /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| 1026 | Content-Type: application/json;charset=UTF-8 |
| 1027 | |
| 1028 | { |
| 1029 | "id": "main:closed", |
| 1030 | "commit_message": "Define the default dashboard" |
| 1031 | } |
| 1032 | ---- |
| 1033 | |
| 1034 | As response the new/updated dashboard is returned as a |
| 1035 | link:#dashboard-info[DashboardInfo] entity. |
| 1036 | |
| 1037 | .Response |
| 1038 | ---- |
| 1039 | HTTP/1.1 200 OK |
| 1040 | Content-Disposition: attachment |
| 1041 | Content-Type: application/json;charset=UTF-8 |
| 1042 | |
| 1043 | )]}' |
| 1044 | { |
| 1045 | "kind": "gerritcodereview#dashboard", |
| 1046 | "id": "main:closed", |
| 1047 | "ref": "main", |
| 1048 | "path": "closed", |
| 1049 | "description": "Merged and abandoned changes in last 7 weeks", |
| 1050 | "url": "/dashboard/?title\u003dClosed+changes\u0026Merged\u003dstatus:merged+age:7w\u0026Abandoned\u003dstatus:abandoned+age:7w", |
| 1051 | "default": true, |
| 1052 | "title": "Closed changes", |
| 1053 | "sections": [ |
| 1054 | { |
| 1055 | "name": "Merged", |
| 1056 | "query": "status:merged age:7w" |
| 1057 | }, |
| 1058 | { |
| 1059 | "name": "Abandoned", |
| 1060 | "query": "status:abandoned age:7w" |
| 1061 | } |
| 1062 | ] |
| 1063 | } |
| 1064 | ---- |
| 1065 | |
| 1066 | [[delete-dashboard]] |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1067 | Delete Dashboard |
| 1068 | ~~~~~~~~~~~~~~~~ |
| 1069 | [verse] |
| 1070 | 'DELETE /projects/link:#project-name[\{project-name\}]/dashboards/link:#dashboard-id[\{dashboard-id\}]' |
| 1071 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1072 | Deletes a project dashboard. |
| 1073 | |
| 1074 | Currently only supported for the `default` dashboard. |
| 1075 | |
| Edwin Kempin | efec449 | 2013-02-22 10:09:23 +0100 | [diff] [blame] | 1076 | The request body does not need to include a link:#dashboard-input[ |
| John Spurlock | d25fad1 | 2013-03-09 11:48:49 -0500 | [diff] [blame] | 1077 | DashboardInput] entity if no commit message is specified. |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1078 | |
| 1079 | Please note that some proxies prohibit request bodies for DELETE |
| 1080 | requests. |
| 1081 | |
| 1082 | .Request |
| 1083 | ---- |
| 1084 | DELETE /projects/work%2Fmy-project/dashboards/default HTTP/1.0 |
| 1085 | ---- |
| 1086 | |
| 1087 | .Response |
| 1088 | ---- |
| 1089 | HTTP/1.1 204 No Content |
| 1090 | ---- |
| 1091 | |
| Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 1092 | |
| 1093 | [[ids]] |
| 1094 | IDs |
| 1095 | --- |
| 1096 | |
| Edwin Kempin | 196e173 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1097 | [[branch-id]] |
| 1098 | \{branch-id\} |
| 1099 | ~~~~~~~~~~~~~ |
| 1100 | The name of a branch or `HEAD`. The prefix `refs/heads/` can be |
| 1101 | omitted. |
| 1102 | |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1103 | [[dashboard-id]] |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1104 | \{dashboard-id\} |
| 1105 | ~~~~~~~~~~~~~~~~ |
| 1106 | The ID of a dashboard in the format '<ref>:<path>'. |
| 1107 | |
| 1108 | A special dashboard ID is `default` which represents the default |
| 1109 | dashboard of a project. |
| 1110 | |
| Edwin Kempin | 50d3d9b | 2013-03-06 16:38:26 +0100 | [diff] [blame] | 1111 | [[project-name]] |
| Edwin Kempin | 34d8335 | 2013-02-06 10:40:17 +0100 | [diff] [blame] | 1112 | \{project-name\} |
| 1113 | ~~~~~~~~~~~~~~~~ |
| 1114 | The name of the project. |
| 1115 | |
| 1116 | |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 1117 | [[json-entities]] |
| 1118 | JSON Entities |
| 1119 | ------------- |
| 1120 | |
| Edwin Kempin | a686de9 | 2013-05-09 15:12:34 +0200 | [diff] [blame] | 1121 | [[branch-info]] |
| 1122 | BranchInfo |
| 1123 | ~~~~~~~~~~ |
| 1124 | The `BranchInfo` entity contains information about a branch. |
| 1125 | |
| 1126 | [options="header",width="50%",cols="1,^2,4"] |
| 1127 | |========================= |
| 1128 | |Field Name ||Description |
| 1129 | |`ref` ||The ref of the branch. |
| 1130 | |`revision` ||The revision to which the branch points. |
| 1131 | |`can_delete`|`false` if not set| |
| 1132 | Whether the calling user can delete this branch. |
| 1133 | |========================= |
| 1134 | |
| Edwin Kempin | 5c0d6b3 | 2013-05-09 19:54:37 +0200 | [diff] [blame] | 1135 | [[branch-input]] |
| 1136 | BranchInput |
| 1137 | ~~~~~~~~~~~ |
| 1138 | The `BranchInput` entity contains information for the creation of |
| 1139 | a new branch. |
| 1140 | |
| 1141 | [options="header",width="50%",cols="1,^2,4"] |
| 1142 | |======================= |
| 1143 | |Field Name||Description |
| 1144 | |`ref` |optional| |
| 1145 | The name of the branch. The prefix `refs/heads/` can be |
| 1146 | omitted. + |
| 1147 | If set, must match the branch ID in the URL. |
| 1148 | |`revision`|optional| |
| 1149 | The base revision of the new branch. + |
| 1150 | If not set, `HEAD` will be used as base revision. |
| 1151 | |======================= |
| 1152 | |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 1153 | [[config-info]] |
| 1154 | ConfigInfo |
| 1155 | ~~~~~~~~~~ |
| 1156 | The `ConfigInfo` entity contains information about the effective project |
| 1157 | configuration. |
| 1158 | |
| Edwin Kempin | 81e1d1f | 2013-07-15 10:13:46 +0200 | [diff] [blame] | 1159 | [options="header",width="50%",cols="1,^2,4"] |
| Edwin Kempin | 3660c13 | 2013-07-16 08:03:11 +0200 | [diff] [blame] | 1160 | |========================================= |
| 1161 | |Field Name ||Description |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 1162 | |`description` |optional| |
| 1163 | The description of the project. |
| Edwin Kempin | 3660c13 | 2013-07-16 08:03:11 +0200 | [diff] [blame] | 1164 | |`use_contributor_agreements`|optional| |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 1165 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 1166 | authors must complete a contributor agreement on the site before |
| 1167 | pushing any commits or changes to this project. |
| Edwin Kempin | 3660c13 | 2013-07-16 08:03:11 +0200 | [diff] [blame] | 1168 | |`use_content_merge` |optional| |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 1169 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 1170 | Gerrit will try to perform a 3-way merge of text file content when a |
| 1171 | file has been modified by both the destination branch and the change |
| 1172 | being submitted. This option only takes effect if submit type is not |
| 1173 | FAST_FORWARD_ONLY. |
| Edwin Kempin | 3660c13 | 2013-07-16 08:03:11 +0200 | [diff] [blame] | 1174 | |`use_signed_off_by` |optional| |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 1175 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether |
| 1176 | each change must contain a Signed-off-by line from either the author or |
| 1177 | the uploader in the commit message. |
| Edwin Kempin | 3660c13 | 2013-07-16 08:03:11 +0200 | [diff] [blame] | 1178 | |`require_change_id` |optional| |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 1179 | link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether a |
| 1180 | valid link:user-changeid.html[Change-Id] footer in any commit uploaded |
| 1181 | for review is required. This does not apply to commits pushed directly |
| 1182 | to a branch or tag. |
| Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 1183 | |`max_object_size_limit` || |
| 1184 | The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size |
| 1185 | limit] of this project as a link:#max-object-size-limit-info[ |
| 1186 | MaxObjectSizeLimitInfo] entity. |
| 1187 | |`submit_type` || |
| 1188 | The default submit type of the project, can be `MERGE_IF_NECESSARY`, |
| 1189 | `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `MERGE_ALWAYS` or |
| 1190 | `CHERRY_PICK`. |
| 1191 | |`state` |optional| |
| 1192 | The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. + |
| 1193 | Not set if the project state is `ACTIVE`. |
| Edwin Kempin | 3660c13 | 2013-07-16 08:03:11 +0200 | [diff] [blame] | 1194 | |`commentlinks` || |
| Edwin Kempin | 8aa53af | 2013-07-15 10:43:15 +0200 | [diff] [blame] | 1195 | Map with the comment link configurations of the project. The name of |
| 1196 | the comment link configuration is mapped to the comment link |
| 1197 | configuration, which has the same format as the |
| 1198 | link:config-gerrit.html#_a_id_commentlink_a_section_commentlink[ |
| 1199 | commentlink section] of `gerrit.config`. |
| Edwin Kempin | 3660c13 | 2013-07-16 08:03:11 +0200 | [diff] [blame] | 1200 | |`theme` |optional| |
| Edwin Kempin | 272402e | 2013-07-15 11:17:36 +0200 | [diff] [blame] | 1201 | The theme that is configured for the project as a link:#theme-info[ |
| 1202 | ThemeInfo] entity. |
| David Ostrovsky | 9e8b2fb | 2013-08-30 08:09:53 +0200 | [diff] [blame] | 1203 | |`actions` |optional| |
| 1204 | Actions the caller might be able to perform on this project. The |
| 1205 | information is a map of view names to |
| 1206 | link:rest-api-changes.html#action-info[ActionInfo] entities. |
| Edwin Kempin | 3660c13 | 2013-07-16 08:03:11 +0200 | [diff] [blame] | 1207 | |========================================= |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 1208 | |
| Edwin Kempin | a23eb10 | 2013-07-17 09:10:54 +0200 | [diff] [blame] | 1209 | [[config-input]] |
| 1210 | ConfigInput |
| 1211 | ~~~~~~~~~~~ |
| 1212 | The `ConfigInput` entity describes a new project configuration. |
| 1213 | |
| 1214 | [options="header",width="50%",cols="1,^2,4"] |
| 1215 | |========================================= |
| 1216 | |Field Name ||Description |
| 1217 | |`description` |optional| |
| 1218 | The new description of the project. + |
| 1219 | If not set, the description is removed. |
| 1220 | |`use_contributor_agreements`|optional| |
| 1221 | Whether authors must complete a contributor agreement on the site |
| 1222 | before pushing any commits or changes to this project. + |
| 1223 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 1224 | If not set, this setting is not updated. |
| 1225 | |`use_content_merge` |optional| |
| 1226 | Whether Gerrit will try to perform a 3-way merge of text file content |
| 1227 | when a file has been modified by both the destination branch and the |
| 1228 | change being submitted. This option only takes effect if submit type is |
| 1229 | not FAST_FORWARD_ONLY. + |
| 1230 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 1231 | If not set, this setting is not updated. |
| 1232 | |`use_signed_off_by` |optional| |
| 1233 | Whether each change must contain a Signed-off-by line from either the |
| 1234 | author or the uploader in the commit message. + |
| 1235 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 1236 | If not set, this setting is not updated. |
| 1237 | |`require_change_id` |optional| |
| 1238 | Whether a valid link:user-changeid.html[Change-Id] footer in any commit |
| 1239 | uploaded for review is required. This does not apply to commits pushed |
| 1240 | directly to a branch or tag. + |
| 1241 | Can be `TRUE`, `FALSE` or `INHERIT`. + |
| 1242 | If not set, this setting is not updated. |
| 1243 | |`max_object_size_limit` |optional| |
| 1244 | The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size |
| 1245 | limit] of this project as a link:#max-object-size-limit-info[ |
| 1246 | MaxObjectSizeLimitInfo] entity. + |
| 1247 | If set to `0`, the max object size limit is removed. + |
| 1248 | If not set, this setting is not updated. |
| 1249 | |`submit_type` |optional| |
| 1250 | The default submit type of the project, can be `MERGE_IF_NECESSARY`, |
| 1251 | `FAST_FORWARD_ONLY`, `REBASE_IF_NECESSARY`, `MERGE_ALWAYS` or |
| 1252 | `CHERRY_PICK`. + |
| 1253 | If not set, the submit type is not updated. |
| 1254 | |`state` |optional| |
| 1255 | The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. + |
| 1256 | Not set if the project state is `ACTIVE`. + |
| 1257 | If not set, the project state is not updated. |
| 1258 | |========================================= |
| 1259 | |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 1260 | [[dashboard-info]] |
| 1261 | DashboardInfo |
| 1262 | ~~~~~~~~~~~~~ |
| 1263 | The `DashboardInfo` entity contains information about a project |
| 1264 | dashboard. |
| 1265 | |
| 1266 | [options="header",width="50%",cols="1,^2,4"] |
| 1267 | |=============================== |
| 1268 | |Field Name ||Description |
| 1269 | |`kind` ||`gerritcodereview#dashboard` |
| 1270 | |`id` || |
| 1271 | The ID of the dashboard. The ID has the format '<ref>:<path>', |
| 1272 | where ref and path are URL encoded. |
| 1273 | |`project` || |
| 1274 | The name of the project for which this dashboard is returned. |
| 1275 | |`defining_project`|| |
| 1276 | The name of the project in which this dashboard is defined. |
| 1277 | This is different from `project` if the dashboard is inherited from a |
| 1278 | parent project. |
| 1279 | |`ref` || |
| 1280 | The name of the ref in which the dashboard is defined, without the |
| 1281 | `refs/meta/dashboards/` prefix, which is common for all dashboard refs. |
| 1282 | |`path` || |
| 1283 | The path of the file in which the dashboard is defined. |
| 1284 | |`description` |optional|The description of the dashboard. |
| 1285 | |`foreach` |optional| |
| 1286 | Subquery that applies to all sections in the dashboard. + |
| 1287 | Tokens such as `${project}` are not resolved. |
| 1288 | |`url` || |
| 1289 | The URL under which the dashboard can be opened in the Gerrit WebUI. + |
| 1290 | The URL is relative to the canonical web URL. + |
| 1291 | Tokens in the queries such as `${project}` are resolved. |
| 1292 | |`default` |not set if `false`| |
| 1293 | Whether this is the default dashboard of the project. |
| 1294 | |`title` |optional|The title of the dashboard. |
| 1295 | |`sections` || |
| 1296 | The list of link:#dashboard-section-info[sections] in the dashboard. |
| 1297 | |=============================== |
| 1298 | |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1299 | [[dashboard-input]] |
| 1300 | DashboardInput |
| 1301 | ~~~~~~~~~~~~~~ |
| 1302 | The `DashboardInput` entity contains information to create/update a |
| 1303 | project dashboard. |
| 1304 | |
| 1305 | [options="header",width="50%",cols="1,^2,4"] |
| 1306 | |============================= |
| 1307 | |Field Name ||Description |
| 1308 | |`id` |optional| |
| Edwin Kempin | c95c508 | 2013-03-12 16:56:25 +0100 | [diff] [blame] | 1309 | URL encoded ID of a dashboard to which this dashboard should link to. |
| Edwin Kempin | 67e923c | 2013-02-14 13:57:12 +0100 | [diff] [blame] | 1310 | |`commit_message`|optional| |
| 1311 | Message that should be used to commit the change of the dashboard. |
| 1312 | |============================= |
| 1313 | |
| Edwin Kempin | 5536762 | 2013-02-05 09:09:23 +0100 | [diff] [blame] | 1314 | [[dashboard-section-info]] |
| 1315 | DashboardSectionInfo |
| 1316 | ~~~~~~~~~~~~~~~~~~~~ |
| 1317 | The `DashboardSectionInfo` entity contains information about a section |
| 1318 | in a dashboard. |
| 1319 | |
| 1320 | [options="header",width="50%",cols="1,6"] |
| 1321 | |=========================== |
| 1322 | |Field Name |Description |
| 1323 | |`name` |The title of the section. |
| 1324 | |`query` |The query of the section. + |
| 1325 | Tokens such as `${project}` are not resolved. |
| 1326 | |=========================== |
| 1327 | |
| Edwin Kempin | 4bdc72d | 2013-11-13 13:30:49 +0100 | [diff] [blame] | 1328 | [[gc-input]] |
| 1329 | GCInput |
| 1330 | ~~~~~~~ |
| 1331 | The `GCInput` entity contains information to run the Git garbage |
| 1332 | collection. |
| 1333 | |
| 1334 | [options="header",width="50%",cols="1,^2,4"] |
| 1335 | |============================= |
| 1336 | |Field Name ||Description |
| 1337 | |`show_progress` |`false` if not set| |
| 1338 | Whether progress information should be shown. |
| 1339 | |============================= |
| 1340 | |
| Edwin Kempin | 6b81337 | 2013-03-13 17:07:33 +0100 | [diff] [blame] | 1341 | [[head-input]] |
| 1342 | HeadInput |
| 1343 | ~~~~~~~~~ |
| 1344 | The `HeadInput` entity contains information for setting `HEAD` for a |
| 1345 | project. |
| 1346 | |
| 1347 | [options="header",width="50%",cols="1,6"] |
| 1348 | |============================ |
| 1349 | |Field Name |Description |
| 1350 | |`ref` | |
| 1351 | The ref to which `HEAD` should be set, the `refs/heads` prefix can be |
| 1352 | omitted. |
| 1353 | |============================ |
| 1354 | |
| Edwin Kempin | 0cb5a56 | 2013-07-12 15:41:04 +0200 | [diff] [blame] | 1355 | [[inherited-boolean-info]] |
| 1356 | InheritedBooleanInfo |
| 1357 | ~~~~~~~~~~~~~~~~~~~~ |
| 1358 | A boolean value that can also be inherited. |
| 1359 | |
| 1360 | [options="header",width="50%",cols="1,^2,4"] |
| 1361 | |================================ |
| 1362 | |Field Name ||Description |
| 1363 | |`value` || |
| 1364 | The effective boolean value. |
| 1365 | |`configured_value` || |
| 1366 | The configured value, can be `TRUE`, `FALSE` or `INHERITED`. |
| 1367 | |`inherited_value` |optional| |
| 1368 | The boolean value inherited from the parent. + |
| 1369 | Not set if there is no parent. |
| 1370 | |================================ |
| 1371 | |
| Edwin Kempin | 3c99f59 | 2013-07-15 10:12:27 +0200 | [diff] [blame] | 1372 | [[max-object-size-limit-info]] |
| 1373 | MaxObjectSizeLimitInfo |
| 1374 | ~~~~~~~~~~~~~~~~~~~~~~ |
| 1375 | The `MaxObjectSizeLimitInfo` entity contains information about the |
| 1376 | link:config-gerrit.html#receive.maxObjectSizeLimit[max object size |
| 1377 | limit] of a project. |
| 1378 | |
| 1379 | [options="header",width="50%",cols="1,^2,4"] |
| 1380 | |=============================== |
| 1381 | |Field Name ||Description |
| 1382 | |`value` |optional| |
| 1383 | The effective value of the max object size limit as a formatted string. + |
| 1384 | Not set if there is no limit for the object size. |
| 1385 | |`configured_value`|optional| |
| 1386 | The max object size limit that is configured on the project as a |
| 1387 | formatted string. + |
| 1388 | Not set if there is no limit for the object size configured on project |
| 1389 | level. |
| 1390 | |`inherited_value` |optional| |
| 1391 | The max object size limit that is inherited as a formatted string. + |
| 1392 | Not set if there is no global limit for the object size. |
| 1393 | |=============================== |
| 1394 | |
| Edwin Kempin | 57f303c | 2013-02-13 15:52:22 +0100 | [diff] [blame] | 1395 | [[project-description-input]] |
| 1396 | ProjectDescriptionInput |
| 1397 | ~~~~~~~~~~~~~~~~~~~~~~~ |
| 1398 | The `ProjectDescriptionInput` entity contains information for setting a |
| 1399 | project description. |
| 1400 | |
| 1401 | [options="header",width="50%",cols="1,^2,4"] |
| 1402 | |============================= |
| 1403 | |Field Name ||Description |
| 1404 | |`description` |optional|The project description. + |
| 1405 | The project description will be deleted if not set. |
| 1406 | |`commit_message`|optional| |
| 1407 | Message that should be used to commit the change of the project |
| 1408 | description in the `project.config` file to the `refs/meta/config` |
| 1409 | branch. |
| 1410 | |============================= |
| 1411 | |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 1412 | [[project-info]] |
| 1413 | ProjectInfo |
| 1414 | ~~~~~~~~~~~ |
| 1415 | The `ProjectInfo` entity contains information about a project. |
| 1416 | |
| 1417 | [options="header",width="50%",cols="1,^2,4"] |
| 1418 | |=========================== |
| 1419 | |Field Name ||Description |
| 1420 | |`kind` ||`gerritcodereview#project` |
| 1421 | |`id` ||The URL encoded project name. |
| 1422 | |`name` | |
| 1423 | not set if returned in a map where the project name is used as map key| |
| 1424 | The name of the project. |
| Edwin Kempin | f361182 | 2013-03-19 08:23:09 +0100 | [diff] [blame] | 1425 | |`parent` |optional| |
| Edwin Kempin | 51a6dc9 | 2013-02-04 15:43:59 +0100 | [diff] [blame] | 1426 | The name of the parent project. + |
| 1427 | `?-<n>` if the parent project is not visible (`<n>` is a number which |
| 1428 | is increased for each non-visible project). |
| 1429 | |`description` |optional|The description of the project. |
| 1430 | |`branches` |optional|Map of branch names to HEAD revisions. |
| 1431 | |=========================== |
| 1432 | |
| Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 1433 | [[project-input]] |
| 1434 | ProjectInput |
| 1435 | ~~~~~~~~~~~~ |
| 1436 | The `ProjectInput` entity contains information for the creation of |
| 1437 | a new project. |
| 1438 | |
| 1439 | [options="header",width="50%",cols="1,^2,4"] |
| 1440 | |========================================= |
| 1441 | |Field Name ||Description |
| 1442 | |`name` |optional| |
| 1443 | The name of the project (not encoded). + |
| 1444 | If set, must match the project name in the URL. |
| 1445 | |`parent` |optional| |
| 1446 | The name of the parent project. + |
| 1447 | If not set, the `All-Projects` project will be the parent project. |
| 1448 | |`description` |optional|The description of the project. |
| 1449 | |`permissions_only` |`false` if not set| |
| 1450 | Whether a permission-only project should be created. |
| 1451 | |`create_empty_commit` |`false` if not set| |
| 1452 | Whether an empty initial commit should be created. |
| 1453 | |`submit_type` |optional| |
| 1454 | The submit type that should be set for the project |
| 1455 | (`MERGE_IF_NECESSARY`, `REBASE_IF_NECESSARY`, `FAST_FORWARD_ONLY`, |
| 1456 | `MERGE_ALWAYS`, `CHERRY_PICK`). + |
| 1457 | If not set, `MERGE_IF_NECESSARY` is set as submit type. |
| 1458 | |`branches` |optional| |
| 1459 | A list of branches that should be initially created. + |
| 1460 | For the branch names the `refs/heads/` prefix can be omitted. |
| 1461 | |`owners` |optional| |
| 1462 | A list of groups that should be assigned as project owner. + |
| 1463 | Each group in the list must be specified as |
| 1464 | link:rest-api-groups.html#group-id[group-id]. + |
| 1465 | If not set, the link:config-gerrit.html#repository.name.ownerGroup[ |
| 1466 | groups that are configured as default owners] are set as project |
| 1467 | owners. |
| 1468 | |`use_contributor_agreements`|`INHERIT` if not set| |
| 1469 | Whether contributor agreements should be used for the project (`TRUE`, |
| 1470 | `FALSE`, `INHERIT`). |
| 1471 | |`use_signed_off_by` |`INHERIT` if not set| |
| 1472 | Whether the usage of 'Signed-Off-By' footers is required for the |
| 1473 | project (`TRUE`, `FALSE`, `INHERIT`). |
| 1474 | |`use_content_merge` |`INHERIT` if not set| |
| 1475 | Whether content merge should be enabled for the project (`TRUE`, |
| 1476 | `FALSE`, `INHERIT`). + |
| 1477 | `FALSE`, if the `submit_type` is `FAST_FORWARD_ONLY`. |
| 1478 | |`require_change_id` |`INHERIT` if not set| |
| 1479 | Whether the usage of Change-Ids is required for the project (`TRUE`, |
| 1480 | `FALSE`, `INHERIT`). |
| Sasa Zivkov | 6b40cb4 | 2013-07-01 15:28:22 +0200 | [diff] [blame] | 1481 | |`max_object_size_limit` |optional| |
| 1482 | Max allowed Git object size for this project. |
| 1483 | Common unit suffixes of 'k', 'm', or 'g' are supported. |
| Bruce Zu | 798ea12 | 2013-02-18 16:55:43 +0800 | [diff] [blame] | 1484 | |========================================= |
| 1485 | |
| Edwin Kempin | ecad88c | 2013-02-14 12:09:44 +0100 | [diff] [blame] | 1486 | [[project-parent-input]] |
| 1487 | ProjectParentInput |
| 1488 | ~~~~~~~~~~~~~~~~~~ |
| 1489 | The `ProjectParentInput` entity contains information for setting a |
| 1490 | project parent. |
| 1491 | |
| 1492 | [options="header",width="50%",cols="1,^2,4"] |
| 1493 | |============================= |
| 1494 | |Field Name ||Description |
| 1495 | |`parent` ||The name of the parent project. |
| 1496 | |`commit_message`|optional| |
| 1497 | Message that should be used to commit the change of the project parent |
| 1498 | in the `project.config` file to the `refs/meta/config` branch. |
| 1499 | |============================= |
| 1500 | |
| Edwin Kempin | 19ea9b9 | 2013-03-20 13:20:26 +0100 | [diff] [blame] | 1501 | [[repository-statistics-info]] |
| 1502 | RepositoryStatisticsInfo |
| 1503 | ~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1504 | The `RepositoryStatisticsInfo` entity contains information about |
| 1505 | statistics of a Git repository. |
| 1506 | |
| 1507 | [options="header",width="50%",cols="1,6"] |
| 1508 | |====================================== |
| 1509 | |Field Name |Description |
| 1510 | |`number_of_loose_objects` |Number of loose objects. |
| 1511 | |`number_of_loose_refs` |Number of loose refs. |
| 1512 | |`number_of_pack_files` |Number of pack files. |
| 1513 | |`number_of_packed_objects`|Number of packed objects. |
| 1514 | |`number_of_packed_refs` |Number of packed refs. |
| 1515 | |`size_of_loose_objects` |Size of loose objects in bytes. |
| 1516 | |`size_of_packed_objects` |Size of packed objects in bytes. |
| 1517 | |====================================== |
| 1518 | |
| Edwin Kempin | 272402e | 2013-07-15 11:17:36 +0200 | [diff] [blame] | 1519 | [[theme-info]] |
| 1520 | ThemeInfo |
| 1521 | ~~~~~~~~~ |
| 1522 | The `ThemeInfo` entity describes a theme. |
| 1523 | |
| 1524 | [options="header",width="50%",cols="1,^2,4"] |
| 1525 | |============================= |
| 1526 | |Field Name ||Description |
| 1527 | |`css` |optional| |
| 1528 | The path to the `GerritSite.css` file. |
| 1529 | |`header` |optional| |
| 1530 | The path to the `GerritSiteHeader.html` file. |
| 1531 | |`footer` |optional| |
| 1532 | The path to the `GerritSiteFooter.html` file. |
| 1533 | |============================= |
| 1534 | |
| Edwin Kempin | d0a6392 | 2013-01-23 16:32:59 +0100 | [diff] [blame] | 1535 | |
| 1536 | GERRIT |
| 1537 | ------ |
| 1538 | Part of link:index.html[Gerrit Code Review] |
| Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 1539 | |
| 1540 | SEARCHBOX |
| 1541 | --------- |